﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace WebCastleWindsor.Models
{
    public class Comment
    {
        /// <summary>
        /// 主键 自增
        /// </summary>
        [Key]
        [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }

        /// <summary>
        /// 博客ID 外键
        /// </summary>
        public int BlogId { get; set; }

        /// <summary>
        /// 回复标题
        /// </summary>
        [Required]
        [MinLength(10,ErrorMessage ="最少10个字符")]
        public string Title { get; set; }

        /// <summary>
        /// 回复内容
        /// </summary>
        [Required]
        public string Desc { get; set; }

        /// <summary>
        /// 联系方式
        /// </summary>
        public string QQ { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreatedTime { get; set; }
    }
}